<?php
$category = $this->category;
$products = $this->products;
?>

<div class="content-right" style="width:100%">
<?php if($products): ?>
<?php foreach($products as $key => $product): ?>
    <div class="content-title">
        <h1><?= $key ?></h1>
    </div>
    <?php if($product): ?>
    <?php foreach($product as $p): ?>
    <div class="product-item">
        <a href="/chi-tiet/<?php echo $this->routeUrl($p['name']) . '-' . $p['id'] .'.html'?>"><img class="product-img" src="<?= $p['thumbnail_link'] ?>"/></a>
        <h4 class="product-code">Mã SP: <?= $p['code'] ?></h4>
        <span class="product-price">Giá: <?= $this->currencyFormat($p['price_sale'], null) ?> VNĐ</span>
    </div>
    <?php endforeach; ?>
    <div class="clear" style="height:4px;"></div>
    <?php else: ?>
    <p class="product-empty">
        Sản phẩm đang được cập nhật!
    </p>
    <?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</div>

